home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / ques_221.zip / SAMPLES.ZIP / DEMOS.ZIP / BLAKJACK.Q-A < prev    next >
Text File  |  1990-08-16  |  6KB  |  360 lines

  1. :logo
  2. clearscreen
  3. changecolor 14 1
  4. display "┌─────────────────────────────────────────────────┐|"
  5. display "│   ▄▄  ▄    ▄▄   ▄▄▄ ▄   ▄    ▄  ▄▄   ▄▄▄ ▄   ▄  │|"
  6. display "│  █  █ █   █  █ █    █  █     █ █  █ █    █  █   │|"
  7. display "│  █▀▀▄ █   █▀▀█ █    █▀█      █ █▀▀█ █    █▀█    │|"
  8. display "│  █▄▄▀ █▄▄ █  █ ▀▄▄▄ █  █  ▀▄▄▀ █  █ ▀▄▄▄ █  █   │|"
  9. display "└─────────────────────────────────────────────────┘|"
  10. changecolor 14 0
  11. display "Made with Quesdoor by R. Huiskes      Time Left:"
  12. Listtimeleft
  13. display "|"
  14. :
  15.  
  16. :help
  17. display "|"
  18. display "Welcome to the cardgame BlackJack|"
  19. display "|"
  20. display "This small game is a demonstration game for the|"
  21. display "Extended Questionaire Language door.|"
  22. display "|"
  23. display "You can play this game against the computer.|"
  24. display "You can bet your time left on the bbs, and if you win,|"
  25. display "you get double the time you have bet !...|"
  26. display "But, If you loose, then the time you bet will be|"
  27. display "substracted from the time you have left !|"
  28. display "|"
  29. display "Do you want to play a game ? (Y/n) "
  30. ask 1 4
  31. if 4 = "n"
  32. gotolabel end
  33. endif
  34. :
  35.  
  36. :vraag
  37. clearscreen
  38. gosublabel logo
  39. display "|"
  40. display "Great... Now you're talking...|"
  41. display "|"
  42. display "How many minutes do you want to bet ? (1-9) "
  43. getchoice 123456789 4
  44. display "|"
  45. display "|"
  46. display "Allright, if you win, you get "
  47. display 4
  48. display " minutes extra on the bbs...|"
  49. display "But if the bank wins...."
  50. display "you will have "
  51. display 4
  52. display " minutes less...|"
  53. display "|"
  54. display "Press <ENTER> to play"
  55. ask 0 2
  56. gosublabel logo
  57. :
  58.  
  59.  
  60. :Shuff
  61. setvar 10 = "0"
  62. setvar 11 = "0"
  63. setvar 18 = "21"
  64. display "Shuffling cards...|"
  65. display "|"
  66. :
  67.  
  68. :1st
  69. display "Your first card: "
  70. random 11 1
  71. addvar 10 1
  72. Listanswer 1
  73. :
  74.  
  75. :2nd
  76. display "Your second card: "
  77. random 11 1
  78. addvar 10 1
  79. listanswer 1
  80. setvar 20 = "2"
  81. gotolabel value
  82. :
  83.  
  84. :another
  85. setvar 19 = "1"
  86. addvar 20 19
  87. display "Your "
  88. display 20
  89. display "th card: "
  90. random 11 1
  91. addvar 10 1
  92. listanswer 1
  93. :
  94.  
  95.  
  96. :check
  97. if 10 > 18
  98. gotolabel tehoog
  99. endif
  100. :
  101.  
  102. :value
  103. if 10 = "21"
  104. gotolabel blackjack
  105. endif
  106. display "The total value of your cards is: "
  107. listanswer 10
  108. display "|"
  109. display "Do you want <A>nother card or do you want to <P>ass ? (A/P) "
  110. getchoice AP 2
  111. display "|"
  112. :
  113.  
  114. :choice
  115. if 2 = "a"
  116. gotolabel another
  117. endif
  118. :
  119.  
  120. :pass
  121. clearscreen
  122. setvar 19 = "1"
  123. setvar 20 = "2"
  124. display "You passed - Your value of cards: "
  125. listanswer 10
  126. display "|"
  127. display "|"
  128. display "Now let's look what the bank can do:|"
  129. display "|"
  130. display "Bank's first card: "
  131. random 11 1
  132. addvar 11 1
  133. listanswer 11
  134. display "Bank's second card: "
  135. random 11 1
  136. listanswer 1
  137. addvar 11 1
  138. display "Bank's total: "
  139. listanswer 11
  140. gotolabel bank
  141. :
  142.  
  143. :take
  144. addvar 20 19
  145. display "Bank's "
  146. display 20
  147. display "th card: "
  148. random 11 1
  149. listanswer 1
  150. addvar 11 1
  151. display "Bank's total: "
  152. listanswer 11
  153. :
  154.  
  155. :tohigh
  156. if 11 > 18
  157. gotolabel oops
  158. endif
  159. :
  160.  
  161.  
  162. :bank
  163. if 11 = 18
  164. gotolabel  bblackjack
  165. endif
  166. If 10 > 11
  167. gotolabel take
  168. endif
  169. If 11 = 10
  170. gotolabel equal
  171. endif
  172. if 11 > 10
  173. gotolabel winbank
  174. endif
  175. :
  176.  
  177.  
  178.  
  179.  
  180. :tehoog
  181. beep
  182. beep
  183. Display "|"
  184. Display "You bought yourself out....|"
  185. display "The total value of your cards ("
  186. display 10
  187. display ") is above the 21 !|"
  188. display "Y O U   L O S T !|"
  189. display "|"
  190. display "Press <ENTER>"
  191. ask 0 2
  192. gotolabel timin
  193. :
  194.  
  195. :oops
  196. beep
  197. beep
  198. beep
  199. Display "|"
  200. Display "Oopss...|"
  201. display "The bank bought himself out....|"
  202. display "|"
  203. display "You WON ! Congratulations !|"
  204. display "|"
  205. display "Press <ENTER>"
  206. ask 0 2
  207. gotolabel tiplus
  208. :
  209.  
  210. :Blackjack
  211. display "|"
  212. beep
  213. beep
  214. beep
  215. display "B L A C K J A C K !!!|"
  216. display "|"
  217. display "Congratulations !|"
  218. display "|"
  219. display "Press <ENTER>"
  220. ask 0 2
  221. gotolabel tiplus
  222. :
  223.  
  224.  
  225. :BBlackjack
  226. display "|"
  227. beep
  228. display "The Bank has BLACKJACK !|"
  229. display "To bad, you lost !|"
  230. display "|"
  231. display "Press <ENTER>"
  232. ask 0 2
  233. gotolabel timin
  234. :
  235.  
  236.  
  237. :equal
  238. beep
  239. display "|"
  240. display "Well, we're equal|"
  241. display "Nobody won.... try it again !|"
  242. display "|"
  243. display "Press <ENTER>"
  244. ask 0 2
  245. gotolabel new
  246. :
  247.  
  248. :winbank
  249. if 10 > 11 
  250. gotolabel take
  251. endif
  252. beep
  253. beep
  254. beep
  255. beep
  256. display "|"
  257. display "Haha, the bank won....|"
  258. display "|"
  259. display "Press <ENTER>"
  260. ask 0 2
  261. gotolabel timin
  262. :
  263.  
  264.  
  265.  
  266. :end
  267. display "|"
  268. display "No hard feelings.... Returning you to the bbs|"
  269. delete blakjack.asw
  270. quit
  271. :
  272.  
  273.  
  274.  
  275. :tiplus
  276. gosublabel logo
  277. display "|"
  278. if 4 = "1"
  279. settime +1
  280. endif
  281. if 4 = "2"
  282. settime +2
  283. endif
  284. if 4 = "3"
  285. settime +3
  286. endif
  287. if 4 = "4"
  288. settime +4
  289. endif
  290. if 4 = "5"
  291. settime +5
  292. endif
  293. if 4 = "6"
  294. settime +6
  295. endif
  296. if 4 = "7"
  297. settime +7
  298. endif
  299. if 4 = "8"
  300. settime +8
  301. endif
  302. if 4 = "9"
  303. settime +9
  304. endif
  305. display "Current time left on the bbs after your winning: |"
  306. Listtimeleft
  307. display " minutes.|"
  308. gotolabel new
  309. :
  310.  
  311.  
  312. :timin
  313. gosublabel logo
  314. display "|"
  315. if 4 = "1"
  316. settime -1
  317. endif
  318. if 4 = "2"
  319. settime -2
  320. endif
  321. if 4 = "3"
  322. settime -3
  323. endif
  324. if 4 = "4"
  325. settime -4
  326. endif
  327. if 4 = "5"
  328. settime -5
  329. endif
  330. if 4 = "6"
  331. settime -6
  332. endif
  333. if 4 = "7"
  334. settime -7
  335. endif
  336. if 4 = "8"
  337. settime -8
  338. endif
  339. if 4 = "9"
  340. settime -9
  341. endif
  342. display "Current time left on the bbs after your lose:|"
  343. listtimeleft
  344. display " minutes.|"
  345. gotolabel new
  346. :
  347.  
  348. :new
  349. display "|"
  350. display "Do you want to try another game (y/N)"
  351. ask 1 2
  352. if 2 = "y"
  353. gotolabel vraag
  354. endif
  355. delete blakjack.asw
  356. quit
  357. :
  358.  
  359.  
  360.